<template>
	<view class="location">
		<view class="left">
			<image :src="$IMG_URL('/static/newVersion/location.png')" mode="aspectFill" class="logo"></image>
			<view class="size">
				开启定位服务，为您推荐附近门店
			</view>
		</view>
		<view class="button" @click="sendDataToParent">
			去开启
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
			}
		},
		methods:{
			// 打开定位
			sendDataToParent(){
				let that = this
				uni.openSetting({
					success(res) {
						console.log(res.authSetting)
						that.$emit('childEvent', false);
						
					}
				});
				
			}
		}
	}
</script>

<style lang="scss">
	.location{
		z-index: 9999;
		position: fixed;
		bottom: 20rpx;
		width: 702rpx;
		height: 66rpx;
		opacity: 0.8;
		background: #333333;
		border-radius: 16rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 0 12rpx 0 23rpx;
		.left{
			flex: 1;
			display: flex;
			flex-direction: row;
			align-items: center;
			.logo{
				width: 26rpx;
				height: 30rpx;
				margin-right: 11rpx;
			}
			.size{
				font-size: 24rpx;
				font-family: PingFang SC, PingFang SC-Bold;
				font-weight: 700;
				text-align: left;
				color: #ffffff;
			}
		}
		.button{
			width: 100rpx;
			height: 42rpx;
			background: #73F0EA;
			border-radius: 8rpx;
			font-size: 24rpx;
			font-family: PingFang SC, PingFang SC-Bold;
			font-weight: 700;
			text-align: left;
			color: #000000;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
</style>